package com.raffles.oa.dao.impl;

import java.util.List;
import java.util.Map;

import com.system.common.Page;
import com.raffles.oa.domain.CompanyInfo;
import com.raffles.oa.dao.ICompanyInfoDAO;
import com.system.util.PersistUtil;
import com.raffles.oa.sql.sqlid.CompanyInfoSqlID;
/**
 * : t_raffles_company_info
 * 
 * 
 * @author Gen
 */
public class CompanyInfoDAOImpl implements ICompanyInfoDAO{

	public CompanyInfo insertCompanyInfo(CompanyInfo bean){
		return PersistUtil.insert(bean, CompanyInfoSqlID.INSERT);
	}

	public boolean deleteCompanyInfo(String coinGuid){
		PersistUtil.delete(coinGuid, CompanyInfoSqlID.DELETE);
		return true;
	}	

	public CompanyInfo updateCompanyInfo(CompanyInfo bean){
		return PersistUtil.update(bean, CompanyInfoSqlID.UPDATE);
	}	

	public CompanyInfo loadCompanyInfo(String coinGuid){
		return PersistUtil.query(new CompanyInfo().getClass(), coinGuid);
	}

	public List<CompanyInfo> queryList(Map<String,Object> param,Page page){
		page.setCount(PersistUtil.countSpecial(param, CompanyInfoSqlID.QUERY));
		return PersistUtil.querySpecial(param, CompanyInfoSqlID.QUERY, page.getFullOrderBy(), page.getOffset(), page.getLimit());
	}

}
